package com.hanggold.springboot.lesson4.annotation;

import com.hanggold.springboot.lesson4.enumo.ServerType;
import com.hanggold.springboot.lesson4.select.ServerImportantSelector;
import org.springframework.context.annotation.Import;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Documented
@Import(ServerImportantSelector.class)
public @interface EnableServer {


    @AliasFor("type")
    ServerType value() default ServerType.FTP;


    /**
     * 默认走ftp服务
     * @return
     */
    @AliasFor("value")
    ServerType type() default ServerType.FTP;

}
